home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Gekkan Dennou Club 147
/
Gekkan Dennou Club - 2000.8 Vol. 147 (Japan).7z
/
Gekkan Dennou Club - 2000.8 Vol. 147 (Japan) (Track 1).bin
/
docs
/
ippon
/
data
/
etc
/
titspark.lzh
/
seq.c
< prev
next >
Wrap
C/C++ Source or Header
|
1999-05-07
|
773b
|
49 lines
#include <stdlib.h>
#include "expl.h"
extern void bomb_init (short, short, int, int, char);
unsigned char seq_counter;
static seq_data[]=
{7, 7, 5, 5, 3, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
int seq_init0 (void)
{
return (0);
}
void seq_init (void)
{
seq_counter = 0;
}
void seq_move (void)
{
int i;
if ((seq_counter < 12) && ((i = seq_data[seq_counter]) > 0)) {
do {
double x, y, vx, vy;
x = drand ()* 64.0 -32.0;
y = drand ()* 8.0;
vx = x * 65536.0 / (1.0 + 0.05 * (rand ()% 20));
vy = y * 65536.0 / (1.0 + 0.05 * (rand ()% 20));
bomb_init (
(short) x, (short) y,
(int) vx, (int) vy,
(char) (rand ()% 2 + 1));
} while (--i);
}
if (++seq_counter > 128)
seq_counter = 0;
}
void seq_tini (void)
{
}